/**
 * Created by Administrator on 2025/5/7.
 * */
#ifndef GLOBALPARAMETERS_ERA
#define GLOBALPARAMETERS_ERA

#include "Parameters.h"
#include <memory>

const float INFER_TIME1 = 35.8;
const float INFER_TIME2 = 18.9;
extern float inferTime;

enum class AIPCStateEnum : unsigned int { Online = 0, 
    Ini_Model_Notify = 1, Ini_Model_Updating = 2, Ini_Model_Updated = 3, 
    Tat_Model_Notify = 4, Tat_Model_Updating = 5, Tat_Model_Updated = 6, 
    Sst_Model_Notify = 7, Sst_Model_Updating = 8, Sst_Model_Updated = 9 
};

enum class AICFARStateEnum : unsigned int { Online = 0, 
    Ini_Model_Notify = 1, Ini_Model_Updating = 2, Ini_Model_Updated = 3, 
    Tat_Model_Notify = 4, Tat_Model_Updating = 5, Tat_Model_Updated = 6, 
    Sst_Model_Notify = 7, Sst_Model_Updating = 8, Sst_Model_Updated = 9 
};

class GlobalParameters : public Parameters {
    add_parameter(int,aiPCState,0);
    add_parameter(int,aiPCMonitorState,0);
    add_parameter(int,aiCFARState,0);
    add_parameter(int,aiCFARMonitorState,0);

private:
GlobalParameters() {
}


public:
static GlobalParameters *shareInstance() {
static std::shared_ptr<GlobalParameters> pInstance(new GlobalParameters);

/** 对Ti6678，从核必须共享主核的实例 */
if (globalParametersInstance) {
return (GlobalParameters *) (globalParametersInstance);
}

return pInstance.get();
}
};
#undef add_parameter
#endif //GLOBALPARAMETERS_ERA
